package com.atguigu.feign.fallback;

import com.atguigu.feign.ProductFeignClient;
import com.atguigu.product.bean.Product;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class ProductFeignClientFallback implements ProductFeignClient {
    @Override
    public Product getProductById(Long id) {
        System.out.println("兜底回调");
        Product product = new Product();
        product.setId(id);
        product.setName("小蹇手机");
        product.setPrice(new BigDecimal(8888));
        return product;
    }
}
